package com.ghf.dp5.first;

import com.ghf.dp5.Operation;

public class Main {
    public static void main(String[] args) {
        //加法,工厂方法模式
        OptAddFactory addFactory = new OptAddFactory();
        Operation operation = addFactory.CreateOperation();
        operation.setNuma(1);
        operation.setNumb(2);
        System.out.println(operation.result());
    }
}
